<!DOCTYPE html>
<html>
<head> 
<script type="text/javascript" src="js/md5.js"></script> 
</head>
<body background="img/bk1.jpg";>

<h1 style="text-align:center;font-family:arial;color:block;letter-spacing:2px;"><font size="50">小学生答题测试系统</font></h1>
	<p style="text-align:center;word-spacing:5px">
	<font size="6">
    <a href="/introduce.html">首页</a>&nbsp;
    <a href="/classes.html">教学班</a>&nbsp;&nbsp;
    <a href="/student.html">学生</a>&nbsp;&nbsp;
    <a href="/course.html">课程</a>&nbsp;&nbsp;
    <a href="/question.html">题库</a>&nbsp;&nbsp;
    <a href="/exam.html">测验</a>&nbsp;&nbsp;
    <a href="/loginUser.html">登录</a>&nbsp;&nbsp;
    <a href="/logout.html">退出</a>&nbsp;&nbsp;
    </font>
    </p>

<br><br><br>
<div style="width:100%;text-align:center" font size="25">
  <form method="post" action="/update/password">
新密码: <input type="password" id="pa"  name="password1"><br><br>
重复密码：<input type="password" id="pa2" name="password2"><br><br>  
<input type="hidden"  id="pa3" name="teacherPassword"><br><br>
<input type="hidden"  id="pa4" name="studentPassword"><br><br>                        
<input type="submit" value="提交" onclick="test()">
</form>
</div>
<script type="text/javascript">
function test(){
if(document.getElementById("pa").value==""||document.getElementById("pa2").value==""){
                  alert("密码框不能为空!");
                  return false;
}
else if(document.getElementById("pa").value!=document.getElementById("pa2").value){
        alert("两次密码输入不一致!");
        return false;
}
else{
alert("修改密码成功!");
var password=hex_md5(pa);
document.getElementById("pa3").value=password;
document.getElementById("pa4").value=password;
}
}
</script>